load("//tools:apollo_package.bzl", "apollo_package", "apollo_cc_library", "apollo_component")
load("//tools:cpplint.bzl", "cpplint")

package(default_visibility = ["//visibility:public"])

orin_hesai_COPTS = ['-DMODULE_NAME=\\"orin_hesai\\"']

apollo_cc_library(
    name = "orin_hesai_driver",
    srcs = glob([
        "driver/*.cpp",
        "parser/*.cpp",
        "publisher/*.cpp",
        "receiver/*.cpp",
        "hesai_utils/*.cpp",
        "common/*.cpp",
    ]),
    hdrs = glob([
        "driver/*.h",
        "parser/*.h",
        "publisher/*.h",
        "receiver/*.h",
        "hesai_utils/*.h",
        "common/*.h",
    ]),
    copts = orin_hesai_COPTS,
    # includes = ["common"],
    deps = [
        "//cyber",
        "//modules/common_msgs/sensor_msgs:pointcloud_cc_proto",
	    "//modules/drivers/lidar/orin_hesai/proto:lidar_hesai_config_proto",
        "//cyber/common:cyber_common",
        "@com_github_gflags_gflags//:gflags",
    ],
)

apollo_component(
    name = "liborin_hesai_driver_component.so",
    srcs = [
        "component/lidar_hesai_driver_component.cpp",
    ],
    hdrs = [
        "component/lidar_hesai_driver_component.h",
    ],
    deps = [
        ":orin_hesai_driver",
        "//cyber",
        "//cyber/common:cyber_common",
    ],
)

filegroup(
    name = "runtime_data",
    srcs = glob([
        "conf/*.txt",
        "conf/*.conf",
        "dag/*.dag",
        "launch/*.launch",
    ]),
)

apollo_package()
#cpplint()

